// Appendix S4
// import data
use "data_main_aan25_militias_neg.dta", clear

// Variable Lists:
// Main explanatory variables: alternative measurements
global xx0  pgm_nonciv 	  	target_civilian


// Core control variables
global core impgdppcln imppopln c.v2x_polyarchy dydurln 
global vio_ag_civ violence_civ_reb_lag_ln violence_civ_gov_lag_ln
global intensity  Intensity_rate_lag brd_d_ln 
global cont2 rebno_ct lull UN Ethnicincomp 
global cont3 PrevMed_5y RebTerCont RebPolWingLeg RebExpSup Internationalized
global ts tsln tsln2 tsln3


// Table S41
// Model 1
logit Negotiation $xx0 $core $intensity $ts , robust cluster(DyadId)
estat ic
mat es_ic = r(S)
local LL: display %4.1f es_ic[1,3]
local AIC: display %4.1f es_ic[1,5]
local BIC: display %4.1f es_ic[1,6]
est store m1
outreg2 m1 using table_app_pgm.doc, alpha(0.001, 0.01, 0.05, 0.10) symbol(***, **, *, +) stats(coef se) dec(2) addstat(LL, `LL', AIC, `AIC', BIC, `BIC') replace label sideway 

// Model 2
logit Negotiation $xx0 $core $intensity $cont2 $ts, robust cluster(DyadId) // MODEL 2
estat ic
mat es_ic = r(S)
local LL: display %4.1f es_ic[1,3]
local AIC: display %4.1f es_ic[1,5]
local BIC: display %4.1f es_ic[1,6]
est store m2
outreg2 m2 using table_app_pgm.doc, alpha(0.001, 0.01, 0.05, 0.10) symbol(***, **, *, +) stats(coef se) dec(2) addstat(LL, `LL', AIC, `AIC', BIC, `BIC') append label sideway 


// Model 3
logit Negotiation $xx0 $core $intensity $cont2 $vio_ag_civ  $ts, robust cluster(DyadId) // MODEL 3
estat ic
mat es_ic = r(S)
local LL: display %4.1f es_ic[1,3]
local AIC: display %4.1f es_ic[1,5]
local BIC: display %4.1f es_ic[1,6]
est store m3
outreg2 m3 using table_app_pgm.doc, alpha(0.001, 0.01, 0.05, 0.10) symbol(***, **, *, +) stats(coef se) dec(2) addstat(LL, `LL', AIC, `AIC', BIC, `BIC') append label sideway 

// Model 4
logit Negotiation $xx0 $core $intensity $cont2 $vio_ag_civ $cont3 $ts, robust cluster(DyadId) // MODEL 4
estat ic
mat es_ic = r(S)
local LL: display %4.1f es_ic[1,3]
local AIC: display %4.1f es_ic[1,5]
local BIC: display %4.1f es_ic[1,6]
est store m4
outreg2 m4 using table_app_pgm.doc, alpha(0.001, 0.01, 0.05, 0.10) symbol(***, **, *, +) stats(coef se) dec(2) addstat(LL, `LL', AIC, `AIC', BIC, `BIC') append label sideway 

// Table S42
mlogit negtype $xx0 $core $intensity $cont2 $ts , robust cluster(DyadId) // mlogit model
estat ic
mat es_ic = r(S)
local LL: display %4.1f es_ic[1,3]
local AIC: display %4.1f es_ic[1,5]
local BIC: display %4.1f es_ic[1,6]
est store x1
outreg2 x1 using table_mlogit_prep_app_pgm.doc, alpha(0.001, 0.01, 0.05, 0.10) symbol(***, **, *, +) stats(coef se) dec(2) addstat(LL, `LL', AIC, `AIC', BIC, `BIC') replace label sideway
